package com.zhy.sping.vo;

import lombok.Data;

@Data
public class R {
    private int code;
    private String msg;
    private Object data;


    public R(){

    }

    public R(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static R ok(String msg,Object data){
        return new R(10000,msg,data);
    }
    public static R fail(String msg){
        return new R(10001,msg,null);
    }
}
